[mirrors]
http://ftp.oregonstate.edu/pub/blfs/conglomeration/MesaLib/MesaLib-10.2.7.tar.bz2

[main]
filesize=7107753
sha512=c6d346499ef9596d3b5cd0bdc0ec64b58e8170203e0c977c54b55652c8792beb471822c101461745f7228a7d15a43924211f56fc0cc989defdc1acc4ea7b8a71
tardir=Mesa-10.2.7

[deps]
dri2proto
dri3proto
presentproto
gettext
glproto
libdrm
libxdamage
libxext
libxml2
libxshmfence
eudev
bison

[deps.host]
flex

[build]
if false ; then
  # add mesaglut to deps when you need it
  # currently this is non-functional as nothing in the glut src tree will
  # be built, so it needs some additional makefile patches.
  tar xf "$C"/MesaGLUT-7.9.2.tar.gz
  mv Mesa-7.9.2/src/glut src/
  mv Mesa-7.9.2/include/GL/* include/GL/
fi

patch -p1 < "$K"/mesa-10.patch
patch -p1 < "$K"/mesa-tls.patch
patch -p1 < "$K"/mesalib-fpclassify.patch

archflags=
[ "$A" = arm ] || [ "$A" = mips ] && archflags=--with-dri-drivers=swrast
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') --with-sysroot=$butch_root_dir"
CPPFLAGS="-D_GNU_SOURCE -I $PWD/include/c11" \
CFLAGS="$optcflags" LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix" $xconfflags \
  --sysconfdir="$butch_prefix"/etc \
  --with-gallium-drivers=nouveau \
  --enable-gallium-llvm=no \
  --enable-gallium-egl=no \
  --enable-gallium-gbm=no \
  --enable-gallium-tests=no \
  --enable-gallium-g3dvl=no \
  --enable-texture-float         \
  --enable-gles1                 \
  --enable-gles2                 \
  --enable-osmesa                \
  --disable-xa                    \
  --disable-gbm                  \
  --disable-asm			\
  --enable-glx-tls               \
  --with-egl-platforms="x11" $archflags \


echo true >  bin/missing

make V=1 -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
